package com.depay.mapper.model;

import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.Date;
import java.util.Objects;

/**
 * @author bing on 2018/7/4
 */
public class UserInfo {

	private long roleId;
	private long diamond;
	private long gold;
    private String address;

    public UserInfo() {}

    private UserInfo(Builder builder) {
        setRoleId(builder.roleId);
        setDiamond(builder.diamond);
        setGold(builder.gold);
        setAddress(builder.address);
    }

	public long getRoleId() {
		return roleId;
	}

	public void setRoleId(long roleId) {
		this.roleId = roleId;
	}

	public long getDiamond() {
		return diamond;
	}

	public void setDiamond(long diamond) {
		this.diamond = diamond;
	}

	public long getGold() {
		return gold;
	}

	public void setGold(long gold) {
		this.gold = gold;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	@Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        UserInfo account = (UserInfo) o;
        return Objects.equals(address, account.address);
    }

    @Override
    public int hashCode() {

        return Objects.hash(address);
    }

    public static final class Builder {

    	private long roleId;
    	private long diamond;
    	private long gold;
        private String address;
 
    	public Builder() {
        }
    	
        public Builder roleId(long val) {
        	roleId = val;
            return this;
        }
       
        public Builder diamond(long val) {
        	diamond = val;
            return this;
        }
       
        public Builder gold(long val) {
        	gold = val;
            return this;
        }
       
        public Builder address(String val) {
        	address = val;
            return this;
        }
       
        public UserInfo build() {
            return new UserInfo(this);
        }
    }
}
